package yogiro.to;

public class MemberTO {

	private String memberId;
	private String memberPassword;
	private String memberName;
	private String memberBirthday;
	private int memberDetail;
	private int memberLevel;
	private String memberZipcode;
	private String memberAddress1;
	private String memberAddress2;
	
	public MemberTO() {}

	public MemberTO(String memberId, String memberPassword, String memberName,
			String memberBirthday, int memberDetail, int memberLevel,
			String memberZipcode, String memberAddress1, String memberAddress2) {
		super();
		this.memberId = memberId;
		this.memberPassword = memberPassword;
		this.memberName = memberName;
		this.memberBirthday = memberBirthday;
		this.memberDetail = memberDetail;
		this.memberLevel = memberLevel;
		this.memberZipcode = memberZipcode;
		this.memberAddress1 = memberAddress1;
		this.memberAddress2 = memberAddress2;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public String getMemberPassword() {
		return memberPassword;
	}

	public void setMemberPassword(String memberPassword) {
		this.memberPassword = memberPassword;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public String getMemberBirthday() {
		return memberBirthday;
	}

	public void setMemberBirthday(String memberBirthday) {
		this.memberBirthday = memberBirthday;
	}

	public int getMemberDetail() {
		return memberDetail;
	}

	public void setMemberDetail(int memberDetail) {
		this.memberDetail = memberDetail;
	}

	public int getMemberLevel() {
		return memberLevel;
	}

	public void setMemberLevel(int memberLevel) {
		this.memberLevel = memberLevel;
	}

	public String getMemberZipcode() {
		return memberZipcode;
	}

	public void setMemberZipcode(String memberZipcode) {
		this.memberZipcode = memberZipcode;
	}

	public String getMemberAddress1() {
		return memberAddress1;
	}

	public void setMemberAddress1(String memberAddress1) {
		this.memberAddress1 = memberAddress1;
	}

	public String getMemberAddress2() {
		return memberAddress2;
	}

	public void setMemberAddress2(String memberAddress2) {
		this.memberAddress2 = memberAddress2;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((memberAddress1 == null) ? 0 : memberAddress1.hashCode());
		result = prime * result
				+ ((memberAddress2 == null) ? 0 : memberAddress2.hashCode());
		result = prime * result
				+ ((memberBirthday == null) ? 0 : memberBirthday.hashCode());
		result = prime * result + memberDetail;
		result = prime * result
				+ ((memberId == null) ? 0 : memberId.hashCode());
		result = prime * result + memberLevel;
		result = prime * result
				+ ((memberName == null) ? 0 : memberName.hashCode());
		result = prime * result
				+ ((memberPassword == null) ? 0 : memberPassword.hashCode());
		result = prime * result
				+ ((memberZipcode == null) ? 0 : memberZipcode.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MemberTO other = (MemberTO) obj;
		if (memberAddress1 == null) {
			if (other.memberAddress1 != null)
				return false;
		} else if (!memberAddress1.equals(other.memberAddress1))
			return false;
		if (memberAddress2 == null) {
			if (other.memberAddress2 != null)
				return false;
		} else if (!memberAddress2.equals(other.memberAddress2))
			return false;
		if (memberBirthday == null) {
			if (other.memberBirthday != null)
				return false;
		} else if (!memberBirthday.equals(other.memberBirthday))
			return false;
		if (memberDetail != other.memberDetail)
			return false;
		if (memberId == null) {
			if (other.memberId != null)
				return false;
		} else if (!memberId.equals(other.memberId))
			return false;
		if (memberLevel != other.memberLevel)
			return false;
		if (memberName == null) {
			if (other.memberName != null)
				return false;
		} else if (!memberName.equals(other.memberName))
			return false;
		if (memberPassword == null) {
			if (other.memberPassword != null)
				return false;
		} else if (!memberPassword.equals(other.memberPassword))
			return false;
		if (memberZipcode == null) {
			if (other.memberZipcode != null)
				return false;
		} else if (!memberZipcode.equals(other.memberZipcode))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ID :" + memberId + ", 비밀번호 :"
				+ memberPassword + ", 이름 :" + memberName
				+ ", 출생일" + memberBirthday + ", 회원등급="
				+ ", 주민등록번호(뒷자리)" + memberDetail +
				+ memberLevel + ", 우편번호=" + memberZipcode
				+ ", 주소=" + memberAddress1 + ", 상세주소="
				+ memberAddress2 ;
	}
	
	
}